<?php if(!empty($subvo)){
    $v = $subvo;
    $subvo = '';
}
if(!empty($subsubvo)){
    $v = $subsubvo; 
    $subsubvo = '';
}
?>

<div class="viewBox myBox<?php echo $v['id'];?>" <?php if($_SESSION[C('USER_AUTH_KEY')]){?>sortID="<?php echo $v['sort'];?>" modulesID="<?php echo $v['id'];?>" title="<?php echo $v['title'];?>" deleteUrl="<?php echo U('/Admin/Modules/delete',array('id'=>$v['id']));?>" settingUrl="<?php echo U('/Admin/Modules/edit',array('id'=>$v['id']));?>" isEdit="0"<?php }?>>
  <?php if(!empty($v['dataname'])){
                $v['content'] = $v['dataname'];
                
        }else{
            $v['content'] = unserialize($v['content']);
        }
         ?>
  <div class="panel panel-primary">
    <?php include(TMPL_PATH.'Home/TemplateDefault/Public-Moduletitle'.C('TMPL_TEMPLATE_SUFFIX')); ?>
    <div class="panel-body">

      
      
      
      
      
      
       
      <div id="tsShopContainer<?php echo $v['id'];?>">
	<div id="tsImgS">
    
    
    <a href="<?php echo getThumbPath($v['content'][0]['img_url']);?>" title="Images" class="MagicZoom" id="MagicZoom"><img width="300" height="300" src="<?php echo getThumbPath($v['content'][0]['img_url']);?>" /></a>
    
    
    
    </div>
	<div id="tsPicContainer">
		<div id="tsImgSArrL" onclick="tsScrollArrLeft()" <?php if($_SESSION[C('USER_AUTH_KEY')]){?>modulesID="<?php echo $v['id'];?>"<?php }?> class="sPrev viewBoxCss"></div>
		<div id="tsImgSCon">
			<ul>
            
            <?php foreach($v['content'] as $key => $ig){?>
            
            
				<li onclick="showPic(<?php echo $key;?>)" rel="MagicZoom" <?php if($key == 0){?>class="tsSelectImg"<?php }?>><img height="42" width="42" src="<?php echo getThumbPath($ig['img_url']);?>" <?php if($_SESSION[C('USER_AUTH_KEY')]){?>modulesID="<?php echo $v['id'];?>"<?php }?> class="MagicZoomImg viewBoxCss" tsImgS="<?php echo getThumbPath($ig['img_url']);?>" /></li>
				<?php }?>
                
                
                <div style="clear:both;"></div>
                
			</ul>
		</div>
		<div id="tsImgSArrR" onclick="tsScrollArrRight()" <?php if($_SESSION[C('USER_AUTH_KEY')]){?>modulesID="<?php echo $v['id'];?>"<?php }?> class="sNext viewBoxCss"></div>
	</div>
	<img class="MagicZoomLoading" width="16" height="16" src="/Public/Js/imgzoom/images/loading.gif" alt="Loading..." />
</div>
      
      
      
      
      <?php if(strtolower(GROUP_NAME) != 'admin'){?>
      
      <script>
	      $(document).ready(function(e) {
			  
			  
document.getElementById("tsImgSCon").style.width=FliS(0).offsetWidth*4+"px";
	

FulSs().style.width=FliS(0).offsetWidth*FulS().length+15+"px";


tsScrollResize();
			  
            MagicZoom_findZooms();
        });
		
		
		
function tsScrollResize()
{
   var maxWidth=$('#tsShopContainer<?php echo $v['id'];?>').width();
   var maxHeight=$('#tsShopContainer<?php echo $v['id'];?>').width();
	
   var myimg = FimgS();

	var imgNew = new Image();
	imgNew.src = myimg.src;
	
	//将myimg存起来，相当于一个参数，不然异步的时候执行太快，一直是最后一张图
	imgNew.preImg=myimg;
				
			
	//这个是为了防遨游等浏览器，图片宽、高加为0执行
	if (imgNew.width == 0 || imgNew.height == 0) {
			imgNew.onload=function(){
				tsScrollResizeHd(this,maxWidth,maxHeight,this.preImg);
			};
	}
	else
	{
		tsScrollResizeHd(imgNew,maxWidth,maxHeight,myimg);
	}
	
}
	  </script>
      
      
      
      
      <?php }?>
      
      
      
      
      <div class="clearfix"></div>
    </div>
  </div>
</div>
